﻿using demo.Event;
using Prism.Events;
using Prism.Mvvm;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace demo.UserControls
{
    public class UserControl1VM: BindableBase
    {


        private string textInTextBlock;
        public string TextInTextBlock
        {
            get { return textInTextBlock; }
            set { textInTextBlock = value; RaisePropertyChanged(); }
        }

  
        public UserControl1VM()
        {
           


            EventBus.Instance.GetEvent<MessageEvent>().Subscribe(Shows);


            //取消订阅
            //_aggregator.GetEvent<MessageEvent>().Unsubscribe(SubMessage);
        }

        public void Shows(string a)
        {
            TextInTextBlock = a;


        }


    }
}
